home *** CD-ROM | disk | FTP | other *** search
/ LOGIC Apps / Logic-APPLE_II_APPS.iso / mac / LOGIC Apple II 5.25" Library - ProDOS / PRO045.dsk / LISA.DOC.txt < prev    next >
Text File  |  2012-02-16  |  46KB  |  1,101 lines

  1. ______________________________________________________________________________
  2.  
  3.  
  4.              LISA816 v4.0g            SHAREWARE version
  5.  
  6.                   by
  7.  
  8.              Randall Hyde
  9.                   and
  10.            Brian Fitzgerald
  11.  
  12.  
  13. (c) 1980-1987 Randall Hyde and HAL LABS
  14. all rights reserved.
  15.  
  16. Note: this shareware version of LISA may be freely distributed, provided that
  17. the following files are included:
  18.  
  19.        LISA816              shareware assembler
  20.        ANIX.SYSTEM          ANIX system (LISA runs under the ANIX shell)
  21.        LISA.DOC             this document file
  22.        SIMPLECDA.SRC        source to the simple CDA
  23.  
  24. After a two-week review period, you are required to either destroy any copies
  25. you have (should you decide NOT to purchase the assembler package) or send
  26. $50.00 (plus $5.00 shipping and handling) to
  27.  
  28.        HAL Labs
  29.        18942 Dallas
  30.        Perris, CA 92370
  31.  
  32. APDA should also be carrying LISA816 in the near future, along with the ANIX
  33. package (manual, extrinsic source and ANIX shell source).
  34.  
  35. ANIX is freeware, but is (c) 1982-1987 Randall Hyde.
  36. DISASM816 is (c) 1987 HAL Labs
  37.  
  38. ______________________________________________________________________________
  39.  
  40.  
  41. What follows are some notes on using the LISA816 assembler.  Providing an
  42. assembler as share-ware is a large task- an assembler is usually not the
  43. intuitive kind of program that a word processor or terminal emulator is.  So,
  44. even though the accompanying document is 40K long (longer than the assembler!),
  45. everything is not covered.
  46.  
  47. Of course not!  After all, we want you to buy the assembler.  However, we also
  48. want you to get a good feel for what LISA's like.  Therefore, there are several programs included in the package, including the the source to a SIMPLE CDA.  Each file can be LOaded into the assembler, ASMbled (to a file on disk) and run.
  49.  
  50. Any simple questions may be sent online to
  51.  
  52.    GEnie:      HAL.LABS
  53.    DELPHI:     HALLABS
  54.    CompuServe: 72250,3226
  55.  
  56. Until you buy the assembler, we won't answer more than a few simple questions,
  57. of course.  Registers users, of course, get better support.
  58.  
  59.  
  60. How to set up LISA816:
  61.  
  62. LISA816 runs under the ANIX shell.  Therefore, you must have ANIX running
  63. before you can use LISA816.  Either
  64.  
  65.   1) run ANIX.SYSTEM from basic  (ie "-ANIX.SYSTEM")
  66.   2) make a boot disk with PRODOS and ANIX.SYSTEM
  67.  
  68. Then, after you have run ANIX, from the ANIX command line, type
  69.  
  70.   LISA816
  71.  
  72. (assuming that the LISA816 file is in the currently prefixed directory).
  73. ANIX is a command-line interface with many useful programmer extensions;
  74. that's why LISA816 uses it (ANIX was actually developed mainly so that
  75. there would be a decent environment to run LISA in).
  76.  
  77. After that, you're up and running. We hope.
  78.  
  79. Have fun!
  80.  
  81. ______________________________________________________________________________
  82.  
  83. Source Editing Commands
  84.  
  85. LISA has a few special characters of it's own, that only have meaning in
  86. the insert mode.  These special characters are used to enhance source-file
  87. editing.
  88.  
  89.  <<return>> is used to exit insert mode.  This command, as do all the
  90. following commands, needs to be used as the first character of an insert
  91. line. 
  92.  
  93.  <<control-A>> has the effect of moving the insertion point to before the line
  94. immediately preceding the current insertion point.  The previous line is
  95. displayed (for user convenience), and the new line number displayed for
  96. insertion.
  97.  
  98.  <<control-B>> has the effect of moving the insertion point to after the line
  99. immediately following the current insertion point.  The next line is displayed
  100. (for user convenience), and the new line number displayed for insertion.  If
  101. the insertion point is line N, then line N+1 becomes line N, and the new
  102. insertion point is line N+1.
  103.  
  104.  <<control-W>> has the effect of deleting the line previous to the insertion
  105. point, and then starting insertion at that point.  The deleted line is
  106. displayed (for user convenience), and the new line number displayed for
  107. insertion.  This is the most useful of the four special editing commands.
  108. Typically, a line will be entered, the user will press return, and then notice
  109. an error.  Using  <<control-W>> has the same effect as:
  110.  
  111.   <<return>>
  112.  M nn
  113.  ...
  114.  
  115.  <<control-C>> has the effect of deleting the next line in the source following
  116. the insertion point, and placing the insertion point following that line.
  117. The deleted line is displayed (for user convenience), and the new line number
  118. displayed for insertion.  If the insertion point is line N, then line N+1 is
  119. deleted, and the new insertion point is line N (because line N+1 was deleted).
  120.  
  121.  
  122.  
  123. Importing and Exporting Text Files
  124.  
  125. LISA source files are stored in a compressed, tokenized form.  This has
  126. several advantages:
  127.  
  128.   * files are smaller
  129.   * assemblies are faster
  130.   * most errors are caught at edit time, not assembly time
  131.  
  132. The disadvantage, of course, is that files are not stored in a pure text
  133. format.  It is, however, easy to import text from a text file, or to save a
  134. LISA file out as text, by using the READ and WRITE commands.  To import text,
  135. simply use a command of the form
  136.  
  137.    READ nnn <textfile
  138.  
  139. where nnn is the line to start insertion, and textfile is the name of the text
  140. file to read from.  LISA will convert each line from the text file into it's
  141. tokenized format.  If an error is detected in a line, LISA will stop
  142. momentarily and ask you to fix it - note that you can abort the read-in
  143. process (if, for example, you weren't reading a program text file) by pressing
  144.  <<return>> by itself to exit insert mode.
  145.  
  146. Exporting to a text file is just as easy, using a command of the form
  147.  
  148.    WRITE n1,n2 >textfile
  149.  
  150. where n1..n2 is the range of lines to write to the text file named textfile.
  151. Normally, LISA writes text files with no space padding to line columns up.
  152. If you want the space padding, insert the TAB switch in the write command:
  153.  
  154.    WRITE -t n1,n2 >textfile
  155.  
  156. and spaces will be added to pad the columns out as they would be if a LIST
  157. command were issued.
  158.  
  159. READ and WRITE can also be used to move portions of code from one LISA file
  160. to another.  If you have libraries that you raid routines from, or perhaps
  161. equate files that you only want certain lines from, you would use WRITE to
  162. extract the lines needed, and READ to insert them into the correct source file.
  163.  
  164.  
  165. LISA editor commands
  166.  
  167. Note: each command may be abbreviated to the characters shown in upper case.
  168. Optional parameters are enclosed in braces, as {optionalparms}; required
  169. parameters are encased in double-brackets as, <<requiredparms>>.
  170.  
  171.  
  172.  <<ctrl-D>> (execute ANIX command)
  173.  
  174.  Parameters: output file/device.
  175.  Usage:  <<ctrl-D>>  <<anix command>>
  176.  Executes the command following the  <<ctrl-D>> as an ANIX intrinsic command.
  177.  ANIX will report any errors that occur in the execution of the command.
  178.  
  179.  
  180.  <<ctrl-P>> (toggle printer on/off)
  181.  
  182.  Parameters: none
  183.  Toggles the setting of the ANIX printer device; if printer was off, printer
  184.  is turned on, and vice versa.  This action is the same as in the ANIX shell.
  185.  
  186.  
  187.  - (list previous 20 lines)
  188.  
  189.  Parameters: none.
  190.  Lists the 20 lines previous to the last line listed (by any list command).
  191.  
  192.  
  193.  , (list next 20 lines)
  194.  
  195.  Parameters: none.
  196.  Lists the 20 lines after the last line listed (by any list command).
  197.  
  198.  
  199.  . (list 20 lines around current line)
  200.  
  201.  Parameters: none.
  202.  Lists the 20 lines around to the last line listed (by any list command);
  203.  ie, from -10 to +9 around the current line.
  204.  
  205.  
  206.  ? (command help)
  207.  
  208.  Parameters: output file/device.
  209.  Usage: ? {>outfile}
  210.  Prints a short summary of all the LISA commands available; if {>outfile}
  211.  is present, output is redirected to the selected file or device.
  212.  
  213.  
  214.  Assemble (assemble source)
  215.  
  216.  Parameters: output file/device.
  217.  Usage: Assemble {>outfile}
  218.  Assemble the source file in memory; if the optional parameter {>outfile} is
  219.  present, output is directed to the selected file or device. If the source
  220.  file in memory ends with a CHN " <<file>>" and not an END, the file in memory
  221.  is saved out to disk as "T.." and then assembly continues with  <<file>>.  
  222.  
  223.  
  224.  BReak (break to monitor)
  225.  
  226.  Parameters: none.
  227.  Exits from LISA into the LISA monitor.  To return to LISA, use  <<control-C>>
  228.  for a LISA warmstart (leaves file intact) or  <<control-B>> for a LISA
  229.  coldstart (does a NEW on re-entry to LISA).
  230.  
  231.  
  232.  COpy (copy source lines)
  233.  
  234.  Parameters: start line, end line, dest line.
  235.  Usage: COpy  <<startline>>, <<endline>>, <<destline>>
  236.  Copies source lines in the range  <<startline>>.. <<endline>> to a position
  237.  in the file starting at  <<startline>>.  Note that  <<endline>> must not be
  238.  less than  <<startline>> and  <<destline>> cannot lie within the selected
  239.  range  <<startline>>.. <<endline>>. 
  240.  
  241.  
  242.  CPu (set CPU type)
  243.  
  244.  Parameters: CPU type
  245.  Usage:  CPu  <<cputype>>
  246.  Set CPU type to be of type  <<cputype>>.  CPU Type must be one of the three:
  247.     6502  65C02  65816
  248.  If  <<cputype>> is omitted, the current CPU type is displayed.
  249.  
  250.  
  251.  Delete (delete source lines)
  252.  
  253.  Parameters: delete line 1, delete line 2.
  254.  Usage:  Delete  <<delline1>>, {delline2}
  255.  Deletes source lines in the range  <<delline1>>.. <<delline2>>.  If
  256.  <<delline2>> is not specified, only line  <<delline1>> is deleted.  The
  257.  range must be legal -  <<delline2>> must not be less than  <<delline1>>.
  258.  
  259.  
  260.  DS (dump symbol table)
  261.  
  262.  Parameters: optional file/device.
  263.  Usage:  DS {>outfile}
  264.  Will print the symbol table from the last assembly to the standard output
  265.  device.  As usual, output may be directed to any ANIX device (>.P for printer,
  266.  >filename for file, etc).
  267.  
  268.  
  269.  Find (find search string)
  270.  
  271.  Parameters: search string.
  272.  Usage:  Find {searchstring}
  273.  Looks for {searchstring} in the file and displays all lines it is contained
  274.  in.  FIND may be aborted by pressing  <<control-C>>.  If no search string is
  275.  specified, FIND will do nothing.
  276.  
  277.  
  278.  FReplace (find and replace)
  279.  
  280.  Parameters: search string, replacement string.
  281.  Usage:  FR {searchstring} ^ {replacestring}
  282.  Looks for {searchstring} in the file and replaces it with {replacestring}
  283.  where-ever found.  FR will prompt for replacement at each occurence of
  284.  {searchstring}.  FR may be aborted by pressing  <<control-C>>.  If no search
  285.  string is specified, FR will do nothing.  If no replacement string is
  286.  specified, FR will delete the search string if allowed.
  287.  
  288.  
  289.  Insert (insert source lines)
  290.  
  291.  Parameters: insert line.
  292.  Usage:  Insert {insline}
  293.  Starts insertion of source code lines at  <<insline>>.  If  <<insline>>
  294.  is not specified, insertion starts at the end of the file.  Insert mode
  295.  is exited by entering  <<return>> on a blank line.
  296.  
  297.  
  298.  LEngth (source file stats)
  299.  
  300.  Parameters: optional file/device.
  301.  Usage:  LEngth {>outfile}
  302.  Will print the statistics for the current source file in memory- length,
  303.  number of symbols.
  304.  
  305.  
  306.  List (List source lines)
  307.  
  308.  Parameters: list line 1, list line two, output file/device.
  309.  Usage:  List {line1},{line2},{>outfile}
  310.  Lists source lines in the range  <<line1>>.. <<line2>>.  If no lines are
  311.  specified, then the entire source file is listed, starting at line 1.  If
  312.  only the first line is specified, then only that line is listed.  If one
  313.  line number is given, followed by a comma, then 20 lines are listed starting
  314.  at that line.  If one line number is given, followed by two commas, then the
  315.  entire source file is listed, starting at that number.  If both numbers are
  316.  given, then the source lines in that range are listed.  If the optional
  317.  parameter {>outfile} is used, output is re-directed to the selected file
  318.  or device.
  319.  
  320.  
  321.  LOad (load source file)
  322.  
  323.  Parameters: ProDOS pathname.
  324.  Usage:  LOad  <<pathname>>
  325.  Used to load a LISA source file from disk.  Errors- applicable ProDOS errors,
  326.  memory full, not LISA vx.x file.
  327.  
  328.  
  329.  Modify (modify source lines)
  330.  
  331.  Parameters: modify line 1, modify line 2.
  332.  Usage:  Modify  <<modline1>>, {modline2}
  333.  Deletes source lines in the range  <<delline1>>.. <<delline2>>, and then
  334.  starts insertion at  <<delline1>>.  Note that  MODIFY is equivalent to
  335.  DELETE followed by INSERT at the first line  <<modline1>>.  MODIFY follows
  336.  the same syntactic rules as DELETE.
  337.  
  338.  
  339.  New (clear LISA workspace)
  340.  
  341.  Parameters: none
  342.  clears the LISA workspace area in preparation for new source file creation.
  343.  
  344.  
  345.  Read (read text file source)
  346.  
  347.  Parameters: insert line, read source.
  348.  Usage:  Read {linenum},{<file}
  349.  Inserts lines from the specified text file starting at line linenum; if
  350.  linenum is not specified, then insertion starts at the end of the source
  351.  file.  Insertion ends when end-of-file is reached.
  352.  
  353.  
  354.  SAve (save source file)
  355.  
  356.  Parameters: ProDOS pathname.
  357.  Usage:  SAve  <<pathname>>
  358.  Used to load a LISA source file from disk.  Errors- applicable ProDOS errors.
  359.  
  360.  
  361.  SYstem (system call)
  362.  
  363.  Parameters: none.
  364.  Returns control to ANIX shell.  To return to LISA, type RUN 303 from ANIX.
  365.  
  366.  
  367.  TAbs (set tab stops)
  368.  
  369.  Parameters: opcode tab, address tab, comment tab.
  370.  Usage:  TAbs { <<optab>>, { <<adtab>>,  <<comtab>>} }
  371.  If no tab stops are specified, then the default tab stops of 10,19,40 are
  372.  used.  If TA 0 is used, the current tab stops are displayed.  If three
  373.  tab stops are specified - TA x,y,z - then the opcode field tab is set to x,
  374.  the address field tab is set to y, and the comment field tab is set to z.
  375.  These tab stops settings are saved with the file.  Note that LISA tab stops
  376.  are implicit, and used for output formatting - the TAB key is not used on
  377.  input.
  378.  
  379.  
  380.  TRansfer (move source lines) 
  381.  
  382.  Parameters: start line, end line, dest line
  383.  Usage:  TRansfer  <<startline>>, <<endline>>, <<destline>>
  384.  Moves source lines in the range  <<startline>>.. <<endline>> to a position
  385.  in the file starting at  <<startline>>. TRANSFER is subject to the same
  386.  restrictions as COPY; it is the same as COPY, except that it deletes the
  387.  original lines from the file. 
  388.  
  389.  
  390.  Write (write source lines)
  391.  
  392.  Parameters: write line 1, write line two, output file/device.
  393.  Usage:  Write {line1},{line2},{>outfile}
  394.  Write out source lines in the range  <<line1>>.. <<line2>>.  No line numbers
  395.  are printed for the listed source lines (as opposed to LIST, which numbers
  396.  each line).  If no lines are specified, then the entire source file is
  397.  listed, starting at line 1.  If only the first line is specified, then only
  398.  that line is listed.  If one line number is given, followed by a comma,
  399.  then 20 lines are listed starting at that line.  If one line number is given,
  400.  followed by two commas, then the entire source file is listed, starting at
  401.  that number.  If both numbers are given, then the source lines in that range
  402.  are listed.  If the optional parameter {>outfile} is used, output is
  403.  re-directed to the selected file or device.  Note that this is the typical
  404.  use of write.
  405.  
  406.  
  407.  
  408. ______________________________________________________________________________
  409.  
  410. LISA expression syntax
  411.  
  412.  
  413. 13.1  Definitions.
  414.  
  415. A token is the smallest meaningful unit of text in a LISA source line.  The
  416. tokens of LISA are classified into special-symbols, identifiers, numbers,
  417. character-strings, and comments.
  418.  
  419. A LISA source line is composed of tokens, separated by blanks (a blank is
  420. defined as the ASCII space character).  The tokens are classified by type
  421. according to the field they are in- label field, opcode field, operand field,
  422. and comment field.  Two adjacent tokens must be separated by one or more
  423. separators if each token is an identifier, number, or opcode.  Only 1 token
  424. may be in the label, opcode, and comment fields apiece- the operand field can
  425. (and often does) contain multiple tokens.
  426.  
  427. 13.1.1 Character Set and Special Symbols.
  428.  
  429. The letters are the English characters A through Z, and a through z.
  430. The decimal digits are the numerals 0 through 9.
  431. The hex digits are the numerals 0 through 9, letters A through Z, and a
  432. through z.
  433. The binary digits are the numerals 0 and 1.
  434.  
  435. The special-symbols are tokens having one or more fixed meanings.  The
  436. following single characters are special-symbols:
  437.  
  438.  + - * / = < > @ # $ % ^ & | \ ( ) [ ] , ' " ~ :
  439.  
  440. The following character-pairs are special-symbols:
  441.  
  442.         <=  >=  <>  :A  :L
  443.  
  444. 13.1.2 Labels.
  445.  
  446. A label is an identifier appearing in the label field or the operand field
  447. (regular and numeric), or in the opcode field (macros only).  A label serves
  448. to denote a constant, variable, program address, data address, or macro call.
  449. Identifiers can be any length up to 63 characters, all of which are
  450. significant.  Case is not important in identifiers.  Labels can have the
  451. same spelling as an opcode, because type is determined by context.  A label
  452. must begin with either a letter (regular labels), the special character {^}
  453. (numeric local labels), or the special character {_} (macro call).  Regular
  454. labels can contain letters, numbers, and the special characters {.} and {_}.
  455. A regular label in the operand field can be followed by the type-coercion
  456. tokens {:A} or {:L}.
  457.  
  458. Numeric local labels are {^} followed by 1 numeric digit, and are referred to
  459. as {^0}..{^9} in the label field, or {<0}..{<9} and {>0}..{>9} in the operand
  460. field.  Regular labels must be unique (within their scope); numeric local
  461. labels do not have to be.
  462.  
  463. 13.1.3 Opcodes.
  464.  
  465. An opcode is an indentifier appearing in the opcode field.  An opcode may be
  466. classified into one of three groups- instruction, pseudo-op, or a macro.  The
  467. following opcodes are the legal instructions and psuedo-ops for the assembler:
  468.  
  469.  =   .DA .DB .EL .FI .GO .IF .LA .LX .MD .ME .SA .SX .TF .WE ADC ADD ADR AND
  470.  ANX ASL BBY BCC BCS BEQ BFL BIT BGE BLT BMI BNE BPL BRA BRK BRL BTR BVC BVS
  471.  BYT CHN CLC CLD CLI CLV CMP CND CON COP CPU CPX CPY CSP DBY DCI DEC DEX DEY
  472.  DFS DPH END EOR EPZ EQL EQU EXP FZR GEN HBY HEX ICL IF1 IF2 INC INP INX INY
  473.  JML JMP JSL JSR LCL LDA LDX LDY LIB LNK LSR LST MSG MVN MVP NLC NLS NOG NOP
  474.  NOX OBJ ORA ORG PAG PAU PEA PEI PER PHA PHB PHD PHK PHP PHS PHX PHY PLA PLB
  475.  PLD PLP PLX PLY PSM REP RLB RLS ROL ROR RTI RTL RTS RVS SAV SBC SBT SEC SED
  476.  SEG SEI SEP SET STP STR STX STY STZ SUB SWA TAD TAS TAX TAY TCD TCS TDA TDC
  477.  TRB TSA TSB TSC TSX TTL TXA TXS TXY TYA TYX USR WAI WHL XBA XCE XOR ZRO
  478.  
  479. Any other identifier appearing in the opcode field is assumed to be a macro-
  480. all macros must begin with the macro lead-in character {_}.  Any token
  481. appearing in the opcode field that does not parse to an instruction,
  482. pseudo-op, or macro is declared illegal by the editor.
  483.  
  484. 13.1.4 Operands.
  485.  
  486. The operand field contains one or more expressions; each expression is
  487. separated by the special symbol {,}.  An expression consists of a term, which
  488. is an label, number, character-string, or special operand, followed optionally
  489. by operator-term pairs.  An operator is a special-symbol.  The whole
  490. expression may be prefixed by one or more prefix operators {@}, {~} and {-}.
  491. Byte selector operators {#} (low byte), {/} (middle byte), and {^} (high byte)
  492. may also prefix the whole expression (before the normal prefix operators).
  493. Word selector operators {|}-low word and {\}-high word may also prefix the
  494. expression.  Type-coercion suffixes {:A} and {:L} must follow the label they
  495. apply to, not the expression as a whole.
  496.  
  497. 13.1.4.1 Expression modifiers.
  498.  
  499. Expression modifiers are used to modify an entire expression, and are always
  500. the first prefix to an expression.  There are five expression modifiers:
  501.  
  502.      #   select low byte (LISA mode) or low word (APW mode 16-bit)
  503.      /   select middle byte
  504.      ^   select high byte (LISA mode) or high word (APW mode 16-bit)
  505.      |   select low word (LISA mode)
  506.      \   select high word (LISA mode)
  507.  
  508. When used with a 65816 instruction, all the expression prefixes indicate
  509. immediate addressing mode.  When used with LISA pseudo-ops, the expression
  510. prefixes select various parts of a 24-bit value for code generation.
  511.  
  512. 13.1.4.2 Operators.
  513.  
  514. Operators are either monadic (operator preceding expression) or dyadic
  515. (operator infix between two terms.
  516.  
  517. A monadic operator is one of the following special-symbols.
  518.  
  519.  -    @    ~
  520.  
  521. A dyadic operator is one of the following special-symbols.
  522.  
  523.  + - * / < > = <= >= <> & | ^ %
  524.  
  525. 13.1.4.3 Labels.
  526.  
  527. An label appearing in the operand field has the same format as one appearing
  528. in the label field, except for the special case of numeric local labels.
  529. A numeric local label reference in the operand field has the form {<0} to
  530. {<9} and {>0} to {>9}, where {<} and {>} indicate the direction relative to
  531. the expression of the particular local label.
  532.  
  533. A label in the operand field may have a type-coercion suffix that is used to
  534. force address mode type regardless of the declared type of the label- {:A}
  535. is used to force the absolute attribute for a label, and {:L} is used to
  536. force the long attribute for a label.
  537.  
  538. 13.1.4.4 Numbers.
  539.  
  540. A number can be either decimal, hexadecimal, or binary.  Decimal numbers use
  541. no prefix.  Hexadecimal numbers use the {$} character as a prefix.  Binary
  542. numbers use the {%} character as a prefix.
  543.  
  544. 13.1.4.5 Character Strings.
  545.  
  546. A character-string is a sequence of characters delimited by the special
  547. string delimiter characters {'} or {"}.  If {'} are used, the high-order
  548. bit of each byte is set to 0; if {"} are used, the high-order bit of each
  549. byte is set to 1.  Inside the delimiters, a doubled occurrence of the
  550. delimiter inserts one char of that delimiter in the string without terminating
  551. the character string.
  552.  
  553. 13.1.4.5 Special Operand.
  554.  
  555. A special-operand is a sequence of one or more characters representing a
  556. certain value.  There are several special operand types.  The current
  557. program-counter value (of the assembler) can be referenced by {*}.
  558. Macro parameters can be referenced (inside a macro) by {?0}..{?9}.  Parameters
  559. to a macro are numbered by occurrence; parameters, where required, may not be
  560. omitted.
  561.  
  562. 13.1.5 Comments.
  563.  
  564. A comment begins with the {;} character, and optionally (first column only)
  565. with the {*} character.  The comment field is the last field in the source
  566. line, and is terminated by a  <<return>> character.
  567.  
  568. 13.2  Source Line Formats.
  569.  
  570. Each source line is separated into 4 fields: label, opcode, operand, and
  571. comment.  All four fields do not have to be present on a line, but there are
  572. some restrictions to field appearance.  The general case of a LISA source line
  573. is-
  574.  
  575. line # label   opcode     operand                 comment
  576.    11  PROGRAM  lda     SEQUENCE:L + R.OFFST   ;get record byte from sequence
  577.  
  578. The assembler supplies all line numbers.  PROGRAM is in the label field
  579. (the first field), so it is parsed as a label.  LDA is in the opcode field
  580. (the second field), so it is parsed as an opcode, and recognized as a 65816
  581. mnemonic.  SEQUENCE:L+R.OFFST is in the operand field (the third field),
  582. so it is parsed as an operand, in this case as an address expression.  The
  583. remainder of the line starts with the character {;}, so it is parsed as a
  584. comment.
  585.  
  586. If a colon {:} follows the token in the label field, then the line is assumed
  587. to have only the label field in it.
  588.  
  589.    29  STUB:
  590.  
  591. If the first character of the line is a comment char {;} or optionally {*},
  592. the line is assumed to have only the comment field in it.
  593.  
  594.   241 ; The next routine is responsible for gathering characters one at
  595.  
  596. If the first character of the line is a blank (space character), then the
  597. label field is assumed to be null, not specified.
  598.  
  599.   122        mvp   L.BANK,R.BANK       ;move var set
  600.  
  601. If the line ends after the opcode field, or a comment character is found
  602. following the opcode field, then the operand field is assumed to be null,
  603. not specifed.
  604.  
  605.    45       asl                       ;shift twice for x4 indexing
  606.    46       asl
  607.  
  608. Note that in each of the above cases, the lines were listed as LISA would
  609. list them, not as they might be entered.  LISA tokenizes and formats all
  610. source lines according to it's model, checking syntax at line entry time.
  611. A line entered in as:
  612.  
  613.  122 draw lda #myset ;get set number for DRAW
  614.  
  615. would be parsed and listed as
  616.  
  617.  122 draw   lda   #MYSET           ;get set number for DRAW
  618.  
  619. and
  620.  
  621.  123  jsr newplot ;call version 2 plot routine
  622.  
  623. (with a leading space) would be parsed and listed as
  624.  
  625.  123        jsr   newplot         ;call version 2 plot routine
  626.  
  627.  
  628.  
  629. 13.3  Syntax checking.
  630.  
  631. Each line is checked for syntax errors on entry.  The line is broken up into
  632. tokens, and each token analyzed according to it's field position.
  633.  
  634. 13.3.1 Label field.
  635.  
  636. There are two types of labels.  Alpha labels must start with an alphabetic
  637. character, (upper/lower case), and contain only {A}..{Z}, {a}..{z}, {0}..{9},
  638. {.} and {_}.  Labels have a maximum length of 63 characters.  Alphabetic case
  639. is maintained as entered, but has no significance on assembly ("Label" is the
  640. same as "LABEL").  Labels start in the first column of a source line.  Errors
  641. generated by a bad label include:
  642.  
  643.    Bad character in symbol
  644.    Illegal label
  645.    Label required here
  646.  
  647. Numeric local labels start with a caret {^} and are followed by a numeric
  648. digit {0}..{9}.  Only 1 digit is permitted after the {^} symbol.
  649.  
  650. A space { } or a colon {:} must terminate entries in the label field.
  651.  
  652. 13.3.2 Opcode field.
  653.  
  654. There are two types of mnemonics that are legal in the opcode field.  The
  655. first type are the 65816 opcode mnemonics and LISA pseudo-ops.  The second
  656. type are macro invocations.  All legal 65816 opcodes and LISA pseudo-ops are
  657. listed in section 13.1.3.  Macros are identified by a special lead-in
  658. character, currently defined as {_}.  Examples:
  659.  
  660.    23        jsr      PRINT
  661.    24        byt      "Enter file name",0
  662.    25       _GETNAME
  663.  
  664. where line 23 contains a 65816 mnemonic {jsr}, line 24 contains a LISA
  665. pseudo-op {byt}, and line 25 contains a macro call {_GETNAME}.
  666. Errors pertaining to the opcode field include:
  667.  
  668.      Illegal mnemonic
  669.      Illegal label
  670.  
  671. 13.3.3 Operand field.
  672.  
  673. The operand field contains 1 or more expressions; the expression type depends
  674. on the mnemonic in the opcode field.  Expressions can be:
  675.  
  676.  address expressions
  677.  string expressions
  678.  
  679. If the mnemonic is a 65816 opcode, the expression is embedded in address type
  680. selectors, to indicate addressing modes.  Legal 65816 address expressions are:
  681.  
  682.    1      iny                ;implied
  683.    2      asl                ;implied (accumulator)
  684.    3      ldx #dexpr         ;immediate (8 bit)
  685.    4      ldy |aexpr         ;immediate (16 bit)
  686.    5      asl dexpr          ;direct page
  687.    6      inc aexpr          ;absolute
  688.    7      and lexpr          ;absolute long
  689.    8      ldy dexpr,X        ;direct page indexed,X
  690.    9      dec aexpr,X        ;absolute indexed,X
  691.   10      ora lexpr,X        ;absolute long indexed,X
  692.   11      ldx dexpr,Y        ;direct page indexed,Y
  693.   12      ora aexpr,Y        ;absolute indexed,Y
  694.   13      sbc (dexpr)        ;direct page indirect
  695.   14      jmp (aexpr)        ;absolute indirect
  696.   15      adc (dexpr,X)      ;direct page indexed indirect
  697.   16      jsr (aexpr,X)      ;absolute indexed indirect
  698.   17      cmp (dexpr),Y      ;direct page indirect indexed
  699.   18      eor [dexpr]        ;direct page indirect long
  700.   19      jsl [aexpr]        ;absolute indirect long
  701.   20      sbc [dexpr],Y      ;DP indirect long indexed
  702.   21      and dexpr,S        ;stack relative
  703.   22      sta (dexpr,S),Y    ;stack relative indirect index
  704.   23      mvn bexpr,bexpr    ;block move
  705.   24      bcs rexpr          ;program counter relative
  706.   25      brl rlexpr         ;program counter relative long
  707.  
  708. where epxr can be any legal expression that evaluates to an address. Dexpr
  709. must evaluate to a 8-bit (direct page) address.  Aexpr must evaluate to a
  710. 16-bit (absolute) address.  Lexpr must evaluate to a 24-bit long address.
  711. Bexpr evaluates to a 8-bit bank number.  In each case, unique special-symbols
  712. provide address type information; the individual addressing types cause unique
  713. opcodes for each instruction to be assembled.
  714.  
  715. If the mnemonic is a LISA pseudo-op, various combinations of address and/or
  716. string expressions are permitted.  Each expression is separated by a {,}
  717. delimiter.
  718.  
  719.   26      adr aexpr,aexpr,aexpr              ;16-bit addresses
  720.   27      byt "string",expr,'string'         ;byte data declaration.
  721.   28      .da aexpr,#aexpr,/aexp,\aexpr      ;address and byte data
  722.  
  723. Address expressions consist of identifiers and constants combined with
  724. operators.  An expression is of the form
  725.  
  726.  {modifier} {prefix} term {operator-term} {operator-term} . . .
  727.  
  728. There are 5 expression modifiers:
  729.  
  730.      #    use low byte (LISA mode) or low byte/word (APW mode) of expression
  731.      /    use mid byte (LISA mode) of expression
  732.      ^    use high byte (LISA mode) or high byte/word (APW mode) of expression
  733.      |    use low word of expression
  734.      \    use high word of expression
  735.  
  736. There are 3 prefix operators.
  737.  
  738.   @expr   at-operator.      evaluates to {PC-expr}, where PC is the value of
  739.                             the assembler program counter at the start of the
  740.                             instruction line
  741.  -expr    negate-operator.  evaluates to {0-expr}
  742.  ~expr    not-operator.     evaluates to {$FFFFFF EOR expr}.
  743.  
  744. There are 10 types of terms.
  745.  
  746. identifier       statement label or equate label (from EPZ, EQU, EQL etc).
  747.                  The value of the label is used.
  748.   354            decimal number (no prefix character).
  749.   $3B            hexadecimal number.
  750.   %10011         binary number.
  751.   *              value of PC counter (of assembler)
  752.   ?0..?9         macro parameter value (only inside macro).  select one of
  753.                  the 10 possible macro parameters passed to macro invocation.
  754.   ?#             number of macro parameters passed.
  755.   ?:expr         evaluate expr; result must be 0..9 and is used to select
  756.                  one of the 10 possible macro parameters.
  757.   >0..>9         local label reference in forward direction.  >0 refers
  758.                  to next ^0 local label in forward direction, etc.  The
  759.                  value of the local label is used.
  760.   <0..<9         local label reference in backward direction.  <0 refers
  761.                  to next ^0 local label in backward direction, etc.  The
  762.                  value of the local label is used.
  763.  
  764. There are 14 infix operators
  765.  
  766.      +           addition
  767.      -           subtraction
  768.      *           multiplication
  769.      /           division
  770.      %           modulo
  771.      &           bitwise AND
  772.      |           bitwise OR
  773.      ^           bitwise EOR
  774.      =           logical EQUALS
  775.      <           logical LESS THAN
  776.      >           logical GREATER THAN
  777.      <=          logical LESS THAN OR EQUAL
  778.      >=          logical GREATER THAN OR EQUAL
  779.      <>          logical NOT EQUAL
  780.  
  781. String expressions consist of a string delimiter {'} or {"}, followed by some
  782. ASCII characters, and ending with the same string delimiter {'} or {"}.  The
  783. {'} string delimiter sets bit 7 (the MSB)  of each byte to 0; the {"} string
  784. delimiter sets bit 7 of each byte to 1.  To imbed the delimiter char inside
  785. a string, double it.
  786.  
  787.   'A string with bit 7 clear'
  788.   "another with bit 7 set"
  789.   'one with ''an apostrophe'' inside it'
  790.   "a last ""quote"" to remember"
  791.  
  792.  
  793. ______________________________________________________________________________
  794.  
  795. Using the LISA calculator
  796.  
  797.  
  798. Built in to the LISA assembler is a programmer's calculator that will do
  799. decimal and hexadecimal math to 224-1 (3 hexadecimal bytes, the range of
  800. addresses in the 65816); basic 4-functions (+ - * /), boolean operations
  801. (AND OR NOT), negation, left and right shifts, hex to decimal and vice versa.
  802. It also has help screens for ASCII characters, ProDOS 8/ProDOS 16 equates,
  803. and ANIX and CHARIO equates (for programmers writing programs to run under
  804. the ANIX shell.
  805.  
  806. To access the calculator, press  <<esc>>  <<esc>> at any place where LISA is
  807. waiting for a line of input (even in the middle of entering a line of text).
  808. That is,  press the ESC key, and then press it again.  NOTE:  there is a
  809. reason why you must push ESC twice to get into the calculator.  Pressing
  810. ESC in ANIX tells it to return the next keypress unchanged; this is the only
  811. way to return all control characters (except RETURN and CTRL-@), since the
  812. normal response to some control characters is as screen editing functions.
  813. So, pressing ESC twice has the effect of returning one ESC char (which is
  814. ASCII $1B or $9B) to the LISA input routine.  Once in the calculator, the
  815. line editing characters are not needed, so only one ESC is necessary until
  816. you return to LISA.
  817.  
  818. The calculator screen should pop up, overlaid on your screen.  Don't worry;
  819. since it's a pop-up window,  it will restore the screen when you exit.
  820. The calculator looks like this:
  821.  
  822.  
  823.  _____________                       !
  824. |  _________  |  ESC: quit           !
  825. | |         | |    T: ASCII codes    !
  826. | |       0 | |    Q: ANIX equates   !
  827. | |_________| |    P: PRODOS equates !
  828. |             |    O: CHARIO opcodes !
  829. | < >   H M S |                      !
  830. | & | ^ ~     |  H: HEX mode         !
  831. |           + |  M: DECIMAL mode     !
  832. | C D E F   - |  L: clear calculator !
  833. | 8 9 A B   * |  S: change sign      !
  834. | 4 5 6 7   / |  &: AND  ^: EOR      !
  835. | 0 1 2 3   % |  |: OR   ~: NOT      !
  836. |           = |  <: left shift       !
  837. |_____________|  >: right shift      !
  838. --------------------------------------
  839.  
  840.  
  841. Pressing ESC when the calculator is showing will return you back to what you
  842. were doing before you entered the calculator.  So,  you could be in the middle
  843. of entering a source line and want to calculate a constant before entry.
  844. Pressing ESC twice gets you into the calculator, you do the calculation,
  845. note the result, press ESC again to return to line entry, and enter in the
  846. calculated constant.
  847.  
  848. The calculator is fairly self-explanatory.  It is a regular infix calculator
  849. (TI style rather than HP style); so you enter number then operator then
  850. number, etc.  The RETURN key doubles as the "=" key, for ease of use (most
  851. people are well accustomed to hitting RETURN after data entry, much more
  852. so than "=").  Also, once you've hit return, all is not lost.  You can keep
  853. on with operator and number pairs after that.
  854.  
  855. The calculator will also retain the value in the display between calls to it.
  856. However, if you do an assembly, the accumulator number will be lost.  HEX,
  857. DECIMAL, SIGN, and NOT operations are instantaneous; they affect the
  858. accumulator value only, and do not upset pending calculations.
  859.  
  860. In the upper right-hand corner of the calculator are some prompts for some
  861. important help screens.  First of all is the ubiquitous ASCII chart.  This
  862. comes in handy every once in a while (although LISA does handle character
  863. constants well, it helps to know what the actual values are if you're doing
  864. anything the slightest bit tricky or innovative).  Just hit a "T", and the
  865. ASCII chart pops up.  Press ESC to return back to the main calculator display.
  866.  
  867. Second, there is a help screen for ANIX equates.  Pressing "Q" will bring up
  868. the ANIX equates screen.  This comes in handy when you are writing programs
  869. that will execute under the ANIX shell (new extrinsics, little utilities,
  870. etc), and don't want to include the master file of ANIX equates in your small
  871. program.  For ANIX v2.1 running LISA816 v4.0, this will be a list of absolute
  872. equates (since this presumes you are running a //e, or IIGS in emulation
  873. mode) for JSR calls; for ANIX v3.0 running LISA816 v5.0, this will be a list
  874. of COP parameter values, since ANIX v3.0 calls are made via the COP
  875. instruction.  Once again, pressing ESC will return you to the main calculator
  876. screen.
  877.  
  878. Third, there is a help screen for ProDOS equates.  Pressing "P" will bring
  879. up the ProDOS equates screen.  This reference will not only show the ProDOS
  880. call numbers, but also the parameter list structures for each call.  Once
  881. again, if you are running ANIX v2.1, this will show ProDOS 8 (which also is
  882. applicable to ProDOS 1.1.1) calls, and their parameter lists; if you are
  883. running ANIX v3.0, this wil show ProDOS 16 calls.  The ProDOS equates screen
  884. will show the calls by name; pressing the letter next to the name will bring
  885. up a further screen showing the parameter list required for that call.  Press
  886. ESC to exit from an individual parameter list, and ESC from the ProDOS equates
  887. screen to return back to the calculator.
  888.  
  889. Finally, there is a help screen for the CHARIO calls.  Pressing "O" will
  890. bring up the CHARIO equates screen.  This will show you the call numbers
  891. for each CHARIO function; the call number is the parameter to CHARIO needed
  892. to invoke that function for the installed console driver.  Pressing ESC will
  893. return you to the main calculator screen.
  894.  
  895. ______________________________________________________________________________
  896.  
  897. LISA pseudo-ops
  898.  
  899.   Note: not all of these pseudo-ops are implemented in the share-ware version
  900.         of LISA816 (LISA v4.0g).  Specifically:
  901.             HEX  .DB   .LA   .LX   .SA   .SX
  902.             LIB   PSM   LNK  RLB   ICL
  903.  
  904.  
  905. Assembly listing control:
  906.  
  907.       LST              turns assembly listing on.
  908.       NLS              turns assembly listing off.
  909.       GEN              prints all object bytes for each source line.
  910.       NOG              prints at most 4 object bytes per source line.
  911.       EXP              turns assembly listing of macro expansion on.
  912.       NOX              turns assembly listing of macro expansion off.
  913.       CND              turns assembly listing of conditionals on.
  914.       NLC              turns assembly listing of conditionals off.
  915.       PAG              start new page in assembly listing.
  916.       TTL "title"      set new title at top of each assembly listing page,
  917.                        and start new page.
  918.       SBT "sub"        start new subtitle at top of each assembly listing page
  919.                        (but does not start new page).
  920.  
  921.  
  922. Conditional assembly control:
  923.  
  924.       .IF {expr}       assembles code to next .EL or .FI if {expr} evaluates
  925.                        to TRUE.
  926.       IF1              assembles code to next .EL or .FI during pass 1 only.
  927.       IF2              assembles code to next .EL or .FI during pass 2 only.
  928.       .EL              assembles code to next .FI if previous .IF evaluated
  929.                        to FALSE.
  930.       .FI              endif clause for the .IF / .EL / .FI construct.
  931.       WHL {expr}       repeat assembly of code to .WE while {expr} evaluates
  932.                        to TRUE.
  933.       .WE              endwhile clause for the WHL / .WE construct.
  934.  
  935. Macro assembly:
  936.  
  937.       .MD macro        starts a macro definition with name macro.
  938.       .ME              ends macro definition.
  939.  
  940. Program origin control:
  941.  
  942.       SEG {expr}       start new SEGMENT with attributes "expr".
  943.       ORG expr         defines origin for program code following the ORG.
  944.       OBJ expr         specifies where the object code is stored in memory.
  945.       PHS expr         starts in-line assembly of code with new ORG address.
  946.       DPH              ends in-line assembly and restores to old ORG address.
  947.  
  948. Labels and equates:
  949.  
  950. label EPZ expr         define "label" as ZERO PAGE label with value "expr".
  951. label EPD expr         define label as DIRECT PAGE label (identical to EPZ)
  952. label EQU expr         define label as ABSOLUTE label with value "expr".
  953. label EQL expr         define label as LONG label with value "expr".
  954. label = expr           define label as ABSOLUTE label with value "expr"
  955.                        (the "=" label is re-definable)
  956. label CON expr         define label as CONSTANT label with value "expr".
  957. label SET expr         define label as SET label with value "expr".
  958.  
  959.       FZR label        define label as ZERO PAGE (needed if label used before
  960.                        it is defined).
  961.       FDR label        define label as DIRECT PAGE (identical to EPZ).
  962.       FAR label        define label as LONG (needed if label used before
  963.                        definition).
  964.       INP label        prompt for assembly-time definition of label.
  965.       LCL label        define label as local to specified section (scope
  966.                        ends with RLS).
  967.       RLS label        marks end of local label scope defined with LCL.
  968.  
  969. Constants and storage:
  970.  
  971.       BYT expr, ..     define byte constants of low-order 8 bits of each expr.
  972.       HBY expr, ..     define byte constants of mid-order 8 bits of each expr.
  973.       BBY expr, ..     define byte constants of high-order 8 bits of each expr.
  974.       .DA expr, ..     define byte, word, string constants.
  975.       ADR expr, ..     define word constants (usually addresses)
  976.                        low byte, then high byte.
  977.       DBY expr, ..     define word constants (usually addresses)
  978.                        high byte, then low byte.
  979.       CSP expr, ..     is JSR followed by byte, word, strings (same syntax
  980.                        as .DA)
  981.       DFS expr,{e}     define space of expr bytes, optionally initialized to e.
  982.       HEX hexdigits    define hex string of bytes.
  983.       LONG expr,..      define long (and byte and word) constants
  984.  
  985.  
  986. String declaration:
  987.  
  988.       BYT "string"     define string- {'} creates with bit 7=0, {"} creates
  989.                        with bit 7=1
  990.       DCI "string"     define string as in BYT; bit 7 of last char is inverted
  991.                        from normal.
  992.       RVS "string"     define string as in BYT, but with chars generated in
  993.                        reverse order.
  994.       STR "string"     define string as in BYT, with length byte preceding
  995.                        string (PASCAL)
  996.       ZRO "string"     define string as in BYT, with $00 terminating string
  997.                        (C-string)
  998.  
  999. Control operations:
  1000.  
  1001.       CPU type         set CPU to assemble for.  type = {6502, 65C02, 65816}
  1002.  
  1003.       .DB              declare what bank the DBR (data bank register) is
  1004.                        pointing to.
  1005.  
  1006.       .LA              declare 16-bit ACCUMULATOR mode.
  1007.       .SA              declare 8-bit ACCUMULATOR mode.
  1008.       .LX              declare 16-bit INDEX mode.
  1009.       .SX              declare 8-bit INDEX mode.
  1010.  
  1011.       END              end of source.
  1012.  
  1013.       .TF "file",type  declare file to which generated code is saved to,
  1014.                        and type (type is defined in HEX).
  1015.       SAV "file"       saves memory as binary file.
  1016.       ANX "cmd"        send cmd to ANIX shell to be executed as an ANIX
  1017.                        intrinsic.
  1018.  
  1019.       CHN "file"       chain to next file to be assembled.
  1020.       ICL "file"       include source file in assembly.
  1021.       PSM "file"       include packed-sym file in assembly.
  1022.  
  1023.       LNK "objfile"    include object code in link.
  1024.       LIB "library"    extract needed object code from library in assembly.
  1025.       RLB "objlib"     include information from Run-Time-Library in linkage.
  1026.  
  1027.       .GO expr         jumps to address expr to execute a machine language
  1028.                        routine.
  1029.       USR expr         parses expr, and jumps to user command.
  1030.  
  1031.       MSG "string"     print message to stdout during assembly
  1032.       PAU              force assembly error ("PAU encountered")
  1033.  
  1034. ______________________________________________________________________________
  1035.  
  1036.  
  1037. ANIX Commands
  1038.  
  1039. The format for these commands is given in parenthesis.  Unless otherwise
  1040. stated, these commands are to be followed by a carriage return.
  1041.  
  1042. INTRINSIC COMMANDS
  1043.  
  1044. *                   (Asterisk)        if an asterisk appears in the first
  1045.                     column, that is, the first space, in a line processed by
  1046.                     ANIX, then the rest of the line will be ignored.  The use
  1047.                     of this instruction may not be obvious; it is used to
  1048.                     insert comments within an EXEC file.
  1049.  
  1050. Brk                 (BRK)           Transfers control to the Apple monitor at
  1051.                     location $FF/FF65.  To return to ANIX, type A000G from the
  1052.                     monitor to do an ANIX warmstart.
  1053.  
  1054. Catalog             (CATALOG {pathname}  <<return>>)   Displays the listing of
  1055.                     a directory file.  Abbreviation: "CAT". The pathname
  1056.                     is optional; if it is present, ANIX will give the specified
  1057.                     directory, and if it is absent,  then ANIX will look for
  1058.                     the default directory.  The pathname must be of a DIR
  1059.                     (subdirectory) type file, or a disk (a disk is indicated
  1060.                     with ".Dn", where "n" represents a number between 1 and 8).
  1061.  
  1062. Close               (CLOSE  <<return>>)   Will close any and all open ProDOS
  1063.                     files. This command may be useful after a program
  1064.                     bombs, in order to make sure all the programs opened by the
  1065.                     program are closed properly, and their buffers are freed by
  1066.                     ProDOS.
  1067.  
  1068. Date                (DATE  <<return>>)  This prints the date, in the format
  1069.                       "mm/dd/yy"; it will, that is, if you have a ProDOS
  1070.                     compatible clock installed. (always the case on a IIgs).
  1071.                     Otherwise, this command will print the last date specified
  1072.                     with the SETDATE command; and if the SETDATE command has
  1073.                     not been used, then "-NO DATE" will be printed.
  1074.  
  1075. Delete              (DELETE  <<pathname>> <<return>>)   This will erase a file
  1076.                     from a disk; the pathname is not optional for this command.  It
  1077.                     will not erase a file if its "D" attribute flag is turned
  1078.                     off (if you don't know what an attribute flag is,  wait for
  1079.                     the latter part of this section), so it will have to be
  1080.                     unlocked before it may be deleted.
  1081.  
  1082.                     NOTE: When deleting a subdirectory,  it must be empty
  1083.                     before the DELETE command will work on it.
  1084.  
  1085. Exec                (EXEC <<pathname>> <<return>>)  The EXEC command is used to
  1086.                     redirect input from a textfile rather than a keyboard; the
  1087.                     pathname is not optional, and must be the name of a TXT
  1088.                     type file, a sequential text file.  When the EXEC command
  1089.                     is executed, ANIX then begins looking for ANIX commands
  1090.                     from the named textfile rather than the keyboard.
  1091.  
  1092. Load                (LOAD <<pathname>> {hex address} <<return>>)  Loads a BIN
  1093.                     or SYS file from disk into memory; a pathname is required,
  1094.                     but the hex address is optional.  If the optional hex
  1095.                     address is not present, then the file is loaded at the
  1096.                     location from which it was saved.  Example:
  1097.                          LOAD SHORT.PROGRAM
  1098.  
  1099. Lock                (LOCK {-N -R -W -D} <<pathname>> <<return>>)  This command
  1100.                     and the Unlock command are closely associated, and they
  1101.